<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
	<link rel="icon" href="./images/favicon.ico">

	<title>吹水唔抹嘴</title>
	<link rel="stylesheet" href="{$_C.hy_path}css/main-rchat.css">
</head>
<body>
	<div class="wrapper cm-wrapper">
		<div class="cm-top">
			<div class="col cm-person pada-20 cl-cm-blue marb-8">
				<div class="photo-img">
					<img src="{$info.headimgurl}" style="border-radius: 50%;" alt="">
				</div>
				<div class="photo-info">
					<p class="photo-name text-overflow cl-f-lblue font-12 marb-12">{$info.name}</p>
					<p class="photo-jifen text-overflow font-14" >积分：<span id="userIntegral" >{$info.integral|default:0}</span></p>
				</div>
				<div class="photo-duihuan">
					<p><a id="duihuan" href="javascript:;" class="btn cl-btn-yellow marb-5">立即兑换</a></p>
					<p class="tips"><a id="jifen" href="javascript:;" class=" cl-f-dblue font-12"><i class="icon icon-tips"></i>如何获得积分</a></p>
				</div>
			</div>
			<div class="col cm-title padlr-10" {if $Ad.pic_path }style="background-image:url(/ws{$Ad.pic_path})"{/if}></div>
		</div>
		<div class="cm-list padlr-10" id="chat">
		</div>
		<div class="col cm-bottom cl-cm-dblue padlr-10">
			<input type="text" class="input-text" placeholder="{$placeholder|default:'吐槽吧'}" id="cmText">
			<input type="button" class="input-btn" value="发送" onclick="addCmItem()">
		</div>
	</div>
	<div class="duihuan-alert-wrapper alert-wrapper hide">
		<div class="duihuan-alert alert moveFromTop">
			<i class="icon-close"></i>
			<div class="duihuan-list pada-20 marb-20">
				<p class="font-16 marb-8" id="card_name">---</p>
				<p class="font-12 marb-20"  >（<span id="integral">-</span>积分）</p>
				<a  class="btn font-14 cl-btn-blue marb-5" onclick="info()">确认兑换</a>
				<a  class="btn font-14 cl-btn-red marb-5" id="cancel">放 弃</a>
			</div>
		</div>
	</div>
	<div class="jifen-alert-wrapper alert-wrapper hide">
		<div class="jifen-alert alert moveFromTop" style="background-image: url(http://g4.shfyuan.com/ws/Uploads/home/cm-alert-bg.png);">
			<i class="icon-close"></i>
			<div class="jifen-list pada-20 marb-10" style="height:250px;">
			</div>
		</div>
	</div>
	
	<div class="yhqInfo-alert-wrapper alert-wrapper hide">
		<form class="yhqInfo-alert alert moveFromTop">
			<i class="icon-close"></i>
			<div class="yhqInfo-list pada-20 marb-10">
				<p class="alert-title"><img src="{$_C.hy_path}images/card/info.png" alt=""></p>
				<p class="font-12 marb-10"><input id="username"  name="username"  class="yhqInfo-input" type="text" placeholder="姓名："></p>
				<p class="font-12 marb-20"><input id="phone"  id="phone"  class="yhqInfo-input" type="text" placeholder="电话："></p>
				<p class="btn-con"><a onclick="yhqInfo()" href="javascript:;" class="btn font-14 cl-btn-blue marb-5">提 交</a></p>
			</div>
		</form>
	</div>
	<script>
		var _hmt = _hmt || [];
		(function() {
		  var hm = document.createElement("script");
		  hm.src = "//hm.baidu.com/hm.js?808c919bdc18475fae43350429e11cb4";
		  var s = document.getElementsByTagName("script")[0]; 
		  s.parentNode.insertBefore(hm, s);
		})();
	</script>
	<script src="{$_C.hy_path}js/jquery-1.10.2.min.js"></script>
	<script>
		var timestamp;//用于防止多次评论
			//var timtout = parseInt('{$timeout}')*1000;
			var refreshtime = parseInt('{$refreshtime}')*1000;
			var wxid = '{$info.id}';
			var imgurl = '{$info.headimgurl}';
			var now  = parseInt('{$now}')*1000;//刚登陆的时间
			var number  = 0;//用户评论的次数
			var rule = eval('{$rule}');
			var specialAd = eval('{$specialAd}');
			var carouselAd = eval('{$carouselAd}');
			var refreshtimestamp = parseInt('{$timestamp}');
			var timtout = ((refreshtime/1000)-((now/1000)-refreshtimestamp)%(refreshtime/1000))*1000;
			var commentMinuteMax = parseInt('{$commentMinuteMax}');
			var commentDayMax = parseInt('{$commentDayMax}');
			var commentDayNum = parseInt('{$commentDayNum}');//当前当天用户评论的数量
			var chatMaxNum = parseInt('{$chatMaxNum}');//发言字数限制
			var staggerTime = parseInt('{$staggerTime}');//错位时间
			//已过时间(已过数量，因为新版的刷新时间等同于弹幕池数量)
			var overTime = ((now/1000)-refreshtimestamp)%(refreshtime/1000);
	</script>
	<script src="{$_C.hy_path}js/main-rchat.js"></script>
	
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="{$_C.hy_path}js/chat_card.js"></script>
<script>
		   
		
		 
		
		 
		  wx.config({
		    debug: false, 
		   appId: '{$jsdk.appId}',
				timestamp: {$jsdk.timestamp},
				nonceStr: '{$jsdk.nonceStr}',
				signature: '{$jsdk.signature}',
		    jsApiList: [
		      // 所有要调用的 API 都要加到这个列表中
			  'onMenuShareTimeline',
	      	  'onMenuShareAppMessage',
		      'addCard',

		    ]
		  });
		  wx.ready(function () {
			
			 wx.onMenuShareTimeline({
				    title: 'G4新版弹幕3.0邀您一起来吐槽',
				     link:'http://g4.shfyuan.com/ws/index.php?g=mobile&m=rchat&a=index',
				     imgUrl: 'http://g4.shfyuan.com/ws/Mobile/Webroot/gf/images/chat/share.png',
				      trigger: function (res) {
				       
				      },
				      success: function (res) {
				    	 
				      },
				      cancel: function (res) {
				       
				      },
				      fail: function (res) {
				        warn(JSON.stringify(res));
				      }
			    });
			    
				wx.onMenuShareAppMessage({
				    link:'http://g4.shfyuan.com/ws/index.php?g=mobile&m=rchat&a=index',
				     title: 'G4新版弹幕3.0',
				    desc: 'G4新版弹幕3.0邀您一起来吐槽',
				  	imgUrl: 'http://g4.shfyuan.com/ws/Mobile/Webroot/gf/images/chat/share.png',
				    success: function () { 
				    	
				    },
				    cancel: function () { 
				        // 用户取消分享后执行的回调函数
				    }
			});
			  
		 
		  });
</script>
	
</body>
</html>